package com.carkeeper.order.dao;

import com.carkeeper.order.pojo.Bill;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BillMapper extends Mapper<Bill> {

    @Select("select store_id storeId,store_name storeName,SUM(price) price from tb_bill where pay_state = 0 group by store_name,store_id")
    List<Bill> serviceBill();

    @Select("select * from tb_bill where code != #{code} and store_id=#{storeId}")
    List<Bill> deleteBill(@Param("code") String code,@Param("storeId") Integer storeId);
}
